<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>

<body>
    <div id="app">
        <h1>{{ message}}</h1>
        <h1>{{reversemessage}}</h1>
        <button @click='btn1'>改变</button>
    </div>


    <script>
   
        var app = new Vue({
            el: '#app',
            data: {
                message: 'HelloVue22222!',
                num:100
            },
            methods:{
                fn1() {
                    console.log('进入fn1里面了')
                    return this.num
                },
                btn1(){
                    this.message='hello world 33333'
                }
            },

            computed:{
                computednum(){
                    console.log('进入computednum')

                    return this.num
                },
                reversemessage() {
                    console.log(' reversemessage')
                   
                    return this.message.split('').reverse().join('')
                }
            }

        })

        console.log('app', app)

    </script>
</body>

</html>